int kthToLast(struct ListNode* head, int k) {

    struct ListNode *fast=head, *slow = head;
    while(k--)
    {
        fast = fast ->next;
    }
    while(fast)
    {
        slow=slow->next;
        fast=fast->next;
    }
    return slow->val;
    
}